<template>
  <table border="1" cellspacing="0" cellpadding="10">
    <tr>
      <th>序号</th>
      <th>姓名</th>
      <th>年龄</th>
    </tr>
    <tr v-for="item in users" :key="item.id">
      <td>{{ item.id }}</td>
      <td>{{ item.name }}</td>
      <td>{{ item.age }}</td>
    </tr>
  </table>
</template>

<script lang="ts" setup>
import {ref} from "vue";

const users =ref([
  {
    id:1,
    name:"张三",
    age:18
  },
  {
    id:2,
    name:"张三",
    age:18
  },
  {
    id:3,
    name:"张三",
    age:18
  }
])
</script>

<style>

</style>
